package fragment;

import android.content.Intent;
import android.os.Bundle;
import android.support.annotation.Nullable;
import android.support.v4.app.Fragment;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.RelativeLayout;
import android.widget.Toast;

import yztc.com.shiyuanbaoyou.GuanYuActivity;
import yztc.com.shiyuanbaoyou.R;

/**
 * Created by My on 2016/9/22.
 */
public class GeRenZhongXinFragment extends Fragment {
    private RelativeLayout layout_qingchu,layout_jiancha,layout_guanyu;
    @Nullable
    @Override
    public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
        View view=inflater.inflate(R.layout.fragment_gerenzhongxin,null);
        layout_qingchu= (RelativeLayout) view.findViewById(R.id.layout_qingchu);
        layout_jiancha= (RelativeLayout) view.findViewById(R.id.layout_jiancha);
        layout_guanyu= (RelativeLayout) view.findViewById(R.id.layout_guanyu);
        click();
        return view;
    }


    private void click() {
        layout_qingchu.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                Toast.makeText(getContext(),"缓存清除完毕",Toast.LENGTH_SHORT).show();
            }
        });
        layout_jiancha.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                Toast.makeText(getContext(),"已是最新版本",Toast.LENGTH_SHORT).show();
            }
        });
        layout_guanyu.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                Intent intent=new Intent(getActivity(), GuanYuActivity.class);
                startActivity(intent);
            }
        });
    }





}
